import request from '@/config/axios'

export interface ProductionPrepareVO {
  inventoryNumber: string
  orderNumber: string
  dictOrderType: number
  customerCode: string
  customerName: string
  productNumber: string
  productName: string
  productStandard: string
  creatorName: string
  updaterName: string
  proofreader: string
  proofreaderOpinion: string
  approverName: string
  approverOpinion: string
}

// 查询生产管理--产品管理--发货清单列表
export const getProductionPrepareSendPage = async (params) => {
  return await request.get({ url: `/produce/production-prepare/send/page`, params })
}

// 查询生产管理--产品管理--发货清单详情
export const getProductionPrepareSend = async (id: number) => {
  return await request.get({ url: `/produce/production-prepare/send/get?id=` + id })
}

// 作废生产管理--产品管理--发货清单详情
export const cancelProductionPrepareSend = async (data: ProductionPrepareVO) => {
  return await request.get({ url: `produce/production-prepare/send/cancel`,data })
}

// 导出生产管理--产品管理--发货清单 Excel
export const exportProductionPrepareSend = async (data) => {
  return await request.download({ url: `produce/production-prepare/send/export-excel`, data })
}

// 新增生产管理--产品管理--发货清单
export const createProductionPrepare = async (data: ProductionPrepareVO) => {
  return await request.post({ url: `/produce/production-prepare/create`, data })
}

// 保存生产管理--产品管理--备货清单
export const saveProductionPrepareSend = async (data) => {
  return await request.post({ url: `produce/production-prepare/send/save`, data })
}

// 提交生产管理--产品管理--备货清单
export const submitProductionPrepareSend = async (data) => {
  return await request.post({ url: `/produce/production-prepare/send/submit`, data })
}

// 撤回生产管理--产品管理--备货清单
export const withdrawProductionPrepareSend = async (data) => {
  return await request.post({ url: `admin-api/produce/production-prepare/send/withdraw`, data })
}

//获取订单信息
export const getOrderInfo = async (params) => {
  return await request.get({url:`/order/project-task-book/page`,params})
}

//获取部清单编号
export const getProofreaderPage = async (params) => {
  return await request.get({url:`/produce/production-prepare/proofreader/page`,params})
}

